]> dgit.raspbian.org Git - gnome-shell.git/commit
WeatherClient: set enabled providers after setting a valid location
authorraresvis <rares.visalom@gmail.com>
Sun, 2 Apr 2017 23:02:25 +0000 (02:02 +0300)
committerraresvis <rares.visalom@gmail.com>
Wed, 19 Apr 2017 17:41:35 +0000 (20:41 +0300)
commit8e443a2aff446926395af7975834e1a19cdc4e8a
treed3ce1229f72dc0fa06ec96a743dfb26075012bff
parentfcbb942e2479a16cb2c60e34330d68d18ca095ff
WeatherClient: set enabled providers after setting a valid location

So far, the GWeatherInfo was given the enabled weather providers
as a parameter, at construction time. Because of the way in
which libgweather was designed, setting the providers right from
the beginning enabled libgweather to use them internally in order
to update its state. Updating the internal state is only relevant
when there is a valid location set, which is not guaranteed at the
time when the GWeatherInfo object is constructed.

In order to fix this, enable no providers at construction time and
only set valid providers after setting a valid location.

https://bugzilla.gnome.org/show_bug.cgi?id=780404
js/misc/weather.js